package Lab7;

import java.util.*;

public class NumOccurrence {

    public static void occur() {
        Scanner scan = new Scanner(System.in);
        String[] in = scan.nextLine().split(" 0")[0].split(" ");
        HashMap<String, Integer> map = new HashMap<>();

        for (String s : in) {
            map.put(s, map.getOrDefault(s, 0)+1);

//            if (map.containsKey(s)){
//                map.put(s, map.get(s)+1);
//            }else{
//                map.put(s, 1);
//            }
        }

        int max = Collections.max(map.values());

        System.out.print("Most occurring number(s):");
        map.forEach((s,n) -> {if(n==max) System.out.print(" "+s);});
        System.out.println();
    }

    public static void main(String[] args){
        occur();
    }
}
